package com.wjyf.reducing_bento.model.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author wjyf
 * @since 2023-03-14 08:36:33
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tb_user")
@ApiModel(value = "UserBean对象", description = "用户表")
public class UserBean extends Model<UserBean> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    @TableId(value = "u_id", type = IdType.AUTO)
    private Long uId;

    @ApiModelProperty("用户opid")
    @TableField("u_opid")
    private String uOpid;

    @ApiModelProperty("用户密码")
    @TableField("u_password")
    private String uPassword;

    @ApiModelProperty("用户昵称")
    @TableField("u_name")
    private String uName;

    @ApiModelProperty("用户性别")
    @TableField("u_sex")
    private String uSex;

    @ApiModelProperty("用户电话")
    @TableField("u_phon")
    private String uPhon;

    @ApiModelProperty("用户余额")
    @TableField("u_balanc")
    private Double uBalanc;

    @ApiModelProperty("用户状态（0：正常 1：不可用）")
    @TableField("u_flag")
    private String uFlag;

    @ApiModelProperty("用户权限（0：用户 1：管理员）")
    @TableField("u_power")
    private String uPower;

    @ApiModelProperty("邀请码")
    @TableField("invite_code")
    private String inviteCode;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @Override
    public Serializable pkVal() {
        return this.uId;
    }

}
